﻿import lite.mobile.lib.components.UImageButton;
import lite.mobile.lib.components.skin.UStateButtonSkin;
import lite.mobile.lib.components.UButton;

/**
 * @author libiao2011
 */
class lite.mobile.lib.components.UStateButton extends UImageButton {
	public function UStateButton(name : String, depth : Number) {
		super(name, depth);
	}

	public function getType() : String {
		return "UStateButton";
	}

	/**
	 * 状态选中状态
	 */
	public function toSelect() : Void {
		trace("我是选中.....");
		$_skinMC.gotoAndStop(UStateButtonSkin.SELECTED);
	}
	
	private var _isSelect:Boolean = false ;
	public function isSelect():Boolean {
		return _isSelect ;
	}
	
	public function setSelect(val:Boolean):Void {
		if(val){
			toSelect();
		}
		else {
			 toDefault();
		}
	}
}
